﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SalaryChannel
{
    public partial class Loading : UserControl
    {
        public Loading()
        {
            InitializeComponent();
        }

        public void Show()
        {
            if (Visibility == Visibility.Collapsed)
            {
                Visibility = Visibility.Visible;
                StoryboardShow.Begin();
                App.IsRunning = true;
            }
        }

        public void Stop()
        {
            if (Visibility == Visibility.Visible)
            {
                Visibility = Visibility.Collapsed;
                StoryboardShow.Stop();
                App.IsRunning = false;
            }
        }
    }
}
